<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="cache-control" content="no-cache" />
		<meta http-equiv="expires" content="0" />
		<script type="text/javascript" src="../include-all.js"></script>
		<script language="javascript" type="text/javascript">
			
					window.sd = new Date();
					window.$counter = 0;
			
			jQuery(document).ready(function() {
//				try {
					var v = new dorado.widget.View({
						"id": "viewMain",
						"layout": {
							$type: "Dock",
//							cols: "*,*"
							regionPadding: 2
						},
						"listener": {
							"onCreate": (function(self, arg) {
							}),
							"onReady": (function(self, arg) {
					alert([new Date() - window.sd, window.$counter]);
							})
						}
					});
					
//					var TestObject = $extend([dorado.AttributeSupport, dorado.EventSupport], {
//						ATTRIBUTES: {
//							"userData": {}
//						},
//						
//						doSet: function(attr, value) {
//							return $invokeSuper.call(this, [attr, value]);
//						}
//					});
					
//					var control = new dorado.widget.Control();
//					var control = new TestObject();
					
					function f(v) {
						
						var children = [];
						for (var i = 0; i < 100; i++) {
							children.push(dorado.Toolkits.createInstance("widget", {
								$type: "Panel",
								caption: "Panel" + i,
								width: 100,
								height: 50,
								style: "background: #E0E0E0",
								layoutConstraint: {
//									top: 2,
//									anchorTop: "previous"
								}
							}));
						}
						v.set("children", children);
					
//						for (var i = 0; i < 1000; i++) {
//							control.set("userData", i);
//						}
						
//						for (var i = 0; i < 1000; i++) {
//							control.set("userData", "aaa");
//						}

//						function subFn(a, b, c) {
//							
//						}
//						for (var i = 0; i < 10000; i++) {
//							//var args = Array.prototype.slice.call(arguments, 0);
//							subFn.apply(this, arguments);
//						}
						
						//v.set("children", children);
					}
					
					f(v);
					
					var doradoView = document.getElementById("doradoView");
					
					if (doradoView) v.replace(doradoView);
//				} 
//				catch (e) {
//					dorado.Exception.processException(e);
//				}
			});
		</script>
	</head>
	<body scroll="no" style="margin:0px; overflow:hidden">
		<label id="doradoView" style="display:none"/>
	</body>
</html>